﻿using AntlrTS.LangFundmental;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AntlrTS
{
    public class Scope
    {
        public Dictionary<string, Variable> scope = new Dictionary<string, Variable>();
        //public Variable? find(string name)
        //{
        //    if(scope.ContainsKey(name))
        //    {
        //        return scope[name];
        //    }
        //    return null;
        //}

        public void insert(Variable a)
        {
            scope.Add(a.rawStringName, a);
        }
    }

    public class Module
    {
        TSAST ast=new TSAST();
    }

    public class UsingExpr
    {
        public string moduleName="";
        public HashSet<string> alias=new HashSet<string>();
    }

    public class TSAST
    {
        Scope globalScope=new Scope();
        public string moduleName="";
        public List<TypeConstructors> typeConstructors = new List<TypeConstructors>();
        public List<UsingExpr> usingExprs=new List<UsingExpr>();
        public List<TSFunction> tsFunctions=new List<TSFunction>();
        public Dictionary<string, FunctionAnnoation> globalAnnoation = new Dictionary<string, FunctionAnnoation>();
    }
}
